package com.bjsxt.controller;

import com.bjsxt.pojo.Dept;
import com.bjsxt.service.DeptService;
import com.netflix.discovery.converters.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    private DeptService deptService;

    @PostMapping("/dept/selectAll")
    public List<Dept> showAll(){
        return deptService.selectAll();
    }
    @PostMapping("/dept/selectByid")
    public Dept showByid(Integer deptId){
        return deptService.selectByid(deptId);
    }
}
